home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / -seriously_amiga- / shareware / programming / e / easyplugins / examples / rawkey_demo.e < prev    next >
Text File  |  1997-12-06  |  751b  |  40 lines

  1. /*
  2.  
  3.   $VER: RawKey Demo V1.00 - By Fabio Rotondo
  4.  
  5.         Part of the EasyPLUGINs package
  6.  
  7.   V1.00 - Inital Release
  8.  
  9.  
  10. */
  11.  
  12. OPT OSVERSION=37
  13.  
  14. MODULE 'tools/EasyGUI', 'tools/exceptions',
  15.        'easyplugins/rawkey'
  16.  
  17. PROC main() HANDLE
  18.   DEF n=NIL:PTR TO rawkey
  19.  
  20.   NEW n.init()
  21.  
  22.   n.setattrs([PLA_KEY_UP, {up}, PLA_KEY_CONTROL, {control}, NIL, NIL])
  23.  
  24.   easyguiA('Test RawKey', [ROWS,
  25.                             [TEXT, 'Press Cursor Up OR CTRL keys', NIL, TRUE, 10],
  26.                             [SBUTTON,1, 'Quit!'],
  27.                             [PLUGIN, 0, n]
  28.                           ]
  29.           )
  30.  
  31. EXCEPT DO
  32.   report_exception()
  33.   END n
  34. ENDPROC
  35.  
  36. PROC up() IS WriteF('You pressed Cursor Up!\n')
  37.  
  38. PROC control() IS WriteF('You Pressed Control Key!!\n')
  39.  
  40.